{% extends 'extends/base.html' %}

{% block base_body %}
    {% include 'include/flash.html' %}

    {% from 'macro/card/../../macro/base/../../macro/card/base_card.html' import m_card %}

    {% set head %}
        <h4>登录</h4>
    {% endset %}

    {% set form_html %}
        <form method="POST">
            {{ form.hidden_tag() }}
            <div class="input-group mb-3">
                {{ form.username(class="form-control", placeholder="用户名") }}
            </div>
            <div class="input-group mb-3">
                {{ form.password(class="form-control", placeholder="密码") }}
            </div>
            <div class="row">
                <div class="col-4">
                    {{ form.sub_login(class="btn btn-primary btn-block") }}
                </div>
                <div class="col-4">
                    {{ form.sub_register(class="btn btn-primary btn-block") }}
                </div>
            </div>
        </form>
    {% endset %}


    <div class="login-page"><div class="login-box">
    {{ m_card(head=head,body=form_html,collapse=False) }}
    </div></div>

{% endblock %}